package testing;

import game.Battle;
import game.GameBase;
import game.Item;

import java.util.ArrayList;


public class Test1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GameBase.get().initData();
		
		
		
//		System.out.println(GameBase.get().getMap());
		
		
		game.Character c1 = GameBase.instCharacterByTag("badzo1");
		game.Character c2 = GameBase.instCharacterByTag("badzo2");
		
		ArrayList<game.Character> nj = new ArrayList<game.Character>();
		ArrayList<game.Character> n = new ArrayList<game.Character>();

		
		
		
		
		
		Item i1 = GameBase.instItemByTag("maljina1");
		//Item i2 = GameBase.getItemByTag("kazan1");
		Item i3 = GameBase.instItemByTag("hpotion");
		//Item i4 = GameBase.getItemByTag("mpotion");
		

		
		
		
		Item i = GameBase.instItemByTag("maljina2");
		
		c1.AddToInventory(i);
		c1.AddToInventory(i3);
		c1.EquipItem(i);
		
		c2.setFireResistance(100);
		c2.AddToInventory(i1);
		
		n.add(c1);
		nj.add(c2);
		
		Battle b = new Battle(n,nj);
		
		while(b.doesBorbaTraje())
		{
			game.Character napadac = b.getNaPotezu();
			if(napadac == c1)
				b.napadni(c2);
			else
				b.napadni(c1);
			
			b.prebaciPotez();
		}
		
		/*System.out.println(c2);
		
		System.out.println(i1);
		System.out.println(i2);
		System.out.println(i3);
		System.out.println(i4);*/
		
		//c1.Attack(c2);
		
	}

}
